<html>
<head><meta charset="utf-8"><title>cycles on non-generic bounds · project-const-generics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/index.html">project-const-generics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html">cycles on non-generic bounds</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="228561174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228561174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228561174">(Mar 03 2021 at 09:30)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/HIR-.3EAbstractConst/near/228558262">said</a>:</p>
<blockquote>
<p>concrete constants can depend on <code>u8: Trait&lt;{ complex_concrete_expression }</code> and we can get cycles that way</p>
</blockquote>
<p>I think we should be able to filter out such bounds. We do need to check them, but we don't need to actually care about them beyond having wf check them</p>



<a name="228561279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228561279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228561279">(Mar 03 2021 at 09:30)</a>:</h4>
<p>hmm, what about <code>[u8; { complex_concrete_expression }]: Trait&lt;T&gt;</code>? at this point the bound isn't trivial anymore</p>



<a name="228561628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228561628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228561628">(Mar 03 2021 at 09:33)</a>:</h4>
<p>it's not about trivial, it's the fact that the type being bound on is does not mention any parameters. Without parameters being mentioned, there can be no use of other bounds or benefit for other bounds, right? That bound is just a static assert at that point</p>



<a name="228561756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228561756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228561756">(Mar 03 2021 at 09:34)</a>:</h4>
<p><code>&lt;[u8; 3]&gt;::ASSOC</code> works</p>



<a name="228562086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228562086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228562086">(Mar 03 2021 at 09:36)</a>:</h4>
<p>so these bounds aren't just a static assert, sadly</p>



<a name="228562314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228562314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228562314">(Mar 03 2021 at 09:38)</a>:</h4>
<p>oh right, it puts traits in scope as if they were <code>use</code>d</p>



<a name="228562343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228562343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228562343">(Mar 03 2021 at 09:38)</a>:</h4>
<p>:(</p>



<a name="228562344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228562344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228562344">(Mar 03 2021 at 09:38)</a>:</h4>
<p>well... more actually</p>



<a name="228562393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228562393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228562393">(Mar 03 2021 at 09:39)</a>:</h4>
<p>it limits it to the trait with specific parameters</p>



<a name="228562404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228562404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228562404">(Mar 03 2021 at 09:39)</a>:</h4>
<p>oof, ok <span aria-label="frown" class="emoji emoji-1f641" role="img" title="frown">:frown:</span></p>



<a name="228562462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228562462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228562462">(Mar 03 2021 at 09:40)</a>:</h4>
<p>expressions in where-bounds were a mistake <span aria-label="sparkles" class="emoji emoji-2728" role="img" title="sparkles">:sparkles:</span></p>



<a name="228562521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/cycles%20on%20non-generic%20bounds/near/228562521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/cycles.20on.20non-generic.20bounds.html#228562521">(Mar 03 2021 at 09:40)</a>:</h4>
<p>pack up your things, const generics is over</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>